package com.cy.pj.sys.common;

public class JsonResult {
    /**状态码*/
    private Integer status=1;
    /**状态信息*/
    private String message="ok";
    /**响应数据，查询结果*/
    private Object data;

    public JsonResult() {
    }

    public JsonResult(Integer status) {
        this.status = status;
    }

    public JsonResult(Object data) {
        this.data = data;
    }

    public JsonResult(String message) {
        this.message = message;
    }

    public JsonResult(Integer status, String message, Object data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }
    public JsonResult(Throwable e){
        this.status=0;
        this.message=e.getMessage();
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
